tools/mkrpm: improve version.release handling
authorOlaf Hering <olaf@aepfle.de>
Tue, 24 Mar 2015 14:37:42 +0000 (14:37 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 30 Mar 2015 08:34:57 +0000 (09:34 +0100)
commit624de4dfb43827bd48cf4e683a98dc4ddc1056f5
tree7108444d34a0228a91f5b81b1b08ee7527dc9f84
parent6ea0b23ed5226afc67f3c9d58e5cda35ce41c230
tools/mkrpm: improve version.release handling

An increasing version and/or release number helps to update existing
packages without --force as in "rpm Uvh --force xen.rpm". Instead its
possible to do "rpm -Fvh *.rpm" to update only already installed
packages.

The usage of --force disables essentials checks such as file conflict
detection. As a result the new xen.rpm may overwrite files owned by
other packages.

With the current way of calculating version-release it is difficult to
get an increasing release number into the spec file. The release is
always zero unless "make make XEN_VENDORVERSION=`date +.%s`" is used,
which has the bad side effect that xen.gz always gets a different
filename every time.

Update mkrpm to recognize PKG_RELEASE=. Its value will be appended to
the Release string. It can be filled with a time stamp, like:
 make rpmball PKG_RELEASE="`date +%Y%m%d%H%M%S`"

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
Tested-by: George Dunlap <george.dunlap@eu.citrix.com>
INSTALL
tools/misc/mkrpm